/* 
 * File:   CppUnitRunner.cpp
 * Author: Imre Tabur
 * 
 */
//http://www.boost.org/doc/libs/1_51_0/libs/test/doc/html/utf.html
#if defined(_WIN32) || defined (_WIN64)
#define BOOST_TEST_MAIN
#else
#define BOOST_TEST_DYN_LINK
#endif

#define BOOST_TEST_MODULE FuncoTestModule
#include <boost/test/unit_test.hpp>

int addFunco(int i, int j);

BOOST_AUTO_TEST_CASE(FuncoTest) {
    BOOST_CHECK(addFunco(2, 2) == 4);
    BOOST_REQUIRE(addFunco(2, 2) == 4);
    if (addFunco(2, 2) != 4) {
        BOOST_ERROR("Ouch...");
    }
    if (addFunco(2, 2) != 4) {
        BOOST_FAIL("Ouch...");
    }
    if (addFunco(2, 2) != 4) {
        throw "Ouch...";
    }
    BOOST_CHECK_MESSAGE(addFunco(2, 2) == 4, "add(..) result: " << addFunco(2, 2));
    BOOST_CHECK_EQUAL(4, 4);
}

int addFunco(int i, int j) {
    return i + j;
}
